Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Data Views] Disable scripted field creation in the Data Views management page #202250

Merged

Conversation

davismcphee
Copy link
Contributor

@davismcphee davismcphee commented Nov 29, 2024

Summary

Scripted fields in data views have been deprecated since 7.13, and superseded by runtime fields.

The ability to create new scripted fields has been removed from the Data Views management page in 9.0. Existing scripted fields can still be edited or deleted, and the creation UI can be accessed by navigating directly to /app/management/kibana/dataViews/dataView/{dataViewId}/create-field, but it is recommended to migrate to runtime fields or ES|QL instead to prepare for removal.

Additionally, the scripted fields entry in the Upgrade Assistant has been updated to reflect these changes, improve migration instructions, and surface the full list of data views across all spaces that contain scripted fields as well as their associated spaces. New documentation has been added to the "Manage data views" page with examples and instructions to help users migrate off scripted fields to runtime fields or ES|QL, which is also linked to from the Upgrade Assistant entry.

Data Views management page:
management

Upgrade Assistant:

Resolves #182067.

Checklist

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
  • This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The release_note:breaking label should be applied in these situations.
  • Flaky Test Runner was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines

@davismcphee davismcphee added release_note:breaking backport:skip This commit does not require backporting Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. labels Nov 29, 2024
@davismcphee davismcphee self-assigned this Nov 29, 2024
Copy link
Member

@Bamieh Bamieh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Markdown support for UA deprecations LGTM. Great addition!

@wajihaparvez
Copy link
Contributor

@davismcphee Thank you for updating the docs 😄 @florent-leborgne is on paternity leave, so I'm reviewing this instead. All docs changes LGTM! Just suggesting some small changes for clarity.

Copy link
Member

@pheyos pheyos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test/tsconfig.json changes LGTM

Copy link
Member

@sabarasaba sabarasaba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UA changes lgtm, left one small question

Comment on lines +214 to +215
const textContent =
typeof currentMessage === 'string' ? currentMessage : currentMessage.content;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible that we might run into issues if currentMessage.content doesn't exist?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should be ok because the only valid types are string or { type: 'text' | 'markdown'; content: string; }, and we account for each. Someone could do an unsafe cast when registering their deprecation, but that's true for most TS code.

numberOfDataViewsWithScriptedFields: dataViewsWithScriptedFields.length,
runtimeFieldsLink: docLinks.indexPatterns.runtimeFields,
esqlLink: docLinks.query.queryESQL,
dataViewsList: dataViewsWithScriptedFields.map(buildDataViewsListEntry).join('\n'),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking great, tested and works as expected, no scripted fields in a data view, no tab, just the manual way using the old URL to create a scripted field, which then shows the tab with scripted fields, and no button 🥳

One question, about the deprecation message, previously we showed just a max of 3 data views, but it seems we show them all now? or do I miss something. ... just for the case when there are many data views with scripted fields

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We used to only show up to three titles in the message, but included the full list in the corrective actions:

i18n.translate('dataViews.deprecations.scriptedFields.manualStepTwoMessage', {
defaultMessage:
'Update {numberOfIndexPatternsWithScriptedFields} data views that have scripted fields to use runtime fields instead. In most cases, to migrate existing scripts, you will need to change "return <value>;" to "emit(<value>);". Data views with at least one scripted field: {allTitles}',
values: {
allTitles: indexPatternTitles.join('; '),
numberOfIndexPatternsWithScriptedFields: indexPatternsWithScriptedFields.length,
},
ignoreTag: true,
}),

I removed the ones from correctiveActions and instead put a formatted list in the main message. This could get really long for customers who have many data views with scripted fields, but the alternative is not having access to a full list, so I'm not sure what else we could do here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, that's how it works, thx, what else we can do? Nothing. Approving 👍

Copy link
Contributor Author

@davismcphee davismcphee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wajihaparvez Thanks for the review and heads up about @florent-leborgne! Applied all of your feedback here: 8334e46.

Comment on lines +214 to +215
const textContent =
typeof currentMessage === 'string' ? currentMessage : currentMessage.content;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should be ok because the only valid types are string or { type: 'text' | 'markdown'; content: string; }, and we account for each. Someone could do an unsafe cast when registering their deprecation, but that's true for most TS code.

numberOfDataViewsWithScriptedFields: dataViewsWithScriptedFields.length,
runtimeFieldsLink: docLinks.indexPatterns.runtimeFields,
esqlLink: docLinks.query.queryESQL,
dataViewsList: dataViewsWithScriptedFields.map(buildDataViewsListEntry).join('\n'),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We used to only show up to three titles in the message, but included the full list in the corrective actions:

i18n.translate('dataViews.deprecations.scriptedFields.manualStepTwoMessage', {
defaultMessage:
'Update {numberOfIndexPatternsWithScriptedFields} data views that have scripted fields to use runtime fields instead. In most cases, to migrate existing scripts, you will need to change "return <value>;" to "emit(<value>);". Data views with at least one scripted field: {allTitles}',
values: {
allTitles: indexPatternTitles.join('; '),
numberOfIndexPatternsWithScriptedFields: indexPatternsWithScriptedFields.length,
},
ignoreTag: true,
}),

I removed the ones from correctiveActions and instead put a formatted list in the main message. This could get really long for customers who have many data views with scripted fields, but the alternative is not having access to a full list, so I'm not sure what else we could do here.

Copy link
Member

@kertal kertal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, tested and works as expected, no scripted fields in a data view, no tab, just the manual way using the old URL to create a scripted field, which then shows the tab with scripted fields, and no button. thx for moving scripted fields another step into there well deserved retirement 🦕

@kertal kertal added the Feature:Data Views Data Views code and UI - index patterns before 8.0 label Dec 5, 2024
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/core-deprecations-common 12 15 +3

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
aiAssistantManagementSelection 93.0KB 93.1KB +84.0B
dataViewManagement 140.1KB 140.1KB +65.0B
lists 145.4KB 145.5KB +84.0B
upgradeAssistant 159.8KB 160.2KB +426.0B
total +659.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
core 449.8KB 449.9KB +84.0B
Unknown metric groups

API count

id before after diff
@kbn/core-deprecations-common 20 23 +3

References to deprecated APIs

id before after diff
dataViewManagement 35 40 +5

History

cc @davismcphee

@davismcphee davismcphee added the Feature:Scripted Fields Scripted fields features label Dec 6, 2024
@davismcphee davismcphee merged commit 4215a63 into elastic:main Dec 6, 2024
10 checks passed
@davismcphee davismcphee deleted the davis_disable_scripted_field_creation branch December 6, 2024 00:11
markov00 pushed a commit to markov00/kibana that referenced this pull request Dec 7, 2024
…ment page (elastic#202250)

## Summary

Scripted fields in data views have been deprecated since 7.13, and
superseded by runtime fields.

The ability to create new scripted fields has been removed from the Data
Views management page in 9.0. Existing scripted fields can still be
edited or deleted, and the creation UI can be accessed by navigating
directly to
`/app/management/kibana/dataViews/dataView/{dataViewId}/create-field`,
but it is recommended to migrate to runtime fields or ES|QL instead to
prepare for removal.

Additionally, the scripted fields entry in the Upgrade Assistant has
been updated to reflect these changes, improve migration instructions,
and surface the full list of data views across all spaces that contain
scripted fields as well as their associated spaces. New documentation
has been added to the "Manage data views" page with examples and
instructions to help users migrate off scripted fields to runtime fields
or ES|QL, which is also linked to from the Upgrade Assistant entry.

Data Views management page:

![management](https://github.com/user-attachments/assets/ed42310c-d7fa-48ba-8430-533e9230b48d)

Upgrade Assistant:
<img
src="https://github.com/user-attachments/assets/4ff27866-4fe8-4357-82e8-cd4c503ab50b"
width="500" />

Resolves elastic#182067.

### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [x] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: Matt Kime <[email protected]>
Co-authored-by: kibanamachine <[email protected]>
SoniaSanzV pushed a commit to SoniaSanzV/kibana that referenced this pull request Dec 9, 2024
…ment page (elastic#202250)

## Summary

Scripted fields in data views have been deprecated since 7.13, and
superseded by runtime fields.

The ability to create new scripted fields has been removed from the Data
Views management page in 9.0. Existing scripted fields can still be
edited or deleted, and the creation UI can be accessed by navigating
directly to
`/app/management/kibana/dataViews/dataView/{dataViewId}/create-field`,
but it is recommended to migrate to runtime fields or ES|QL instead to
prepare for removal.

Additionally, the scripted fields entry in the Upgrade Assistant has
been updated to reflect these changes, improve migration instructions,
and surface the full list of data views across all spaces that contain
scripted fields as well as their associated spaces. New documentation
has been added to the "Manage data views" page with examples and
instructions to help users migrate off scripted fields to runtime fields
or ES|QL, which is also linked to from the Upgrade Assistant entry.

Data Views management page:

![management](https://github.com/user-attachments/assets/ed42310c-d7fa-48ba-8430-533e9230b48d)

Upgrade Assistant:
<img
src="https://github.com/user-attachments/assets/4ff27866-4fe8-4357-82e8-cd4c503ab50b"
width="500" />

Resolves elastic#182067.

### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [x] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: Matt Kime <[email protected]>
Co-authored-by: kibanamachine <[email protected]>
SoniaSanzV pushed a commit to SoniaSanzV/kibana that referenced this pull request Dec 9, 2024
…ment page (elastic#202250)

## Summary

Scripted fields in data views have been deprecated since 7.13, and
superseded by runtime fields.

The ability to create new scripted fields has been removed from the Data
Views management page in 9.0. Existing scripted fields can still be
edited or deleted, and the creation UI can be accessed by navigating
directly to
`/app/management/kibana/dataViews/dataView/{dataViewId}/create-field`,
but it is recommended to migrate to runtime fields or ES|QL instead to
prepare for removal.

Additionally, the scripted fields entry in the Upgrade Assistant has
been updated to reflect these changes, improve migration instructions,
and surface the full list of data views across all spaces that contain
scripted fields as well as their associated spaces. New documentation
has been added to the "Manage data views" page with examples and
instructions to help users migrate off scripted fields to runtime fields
or ES|QL, which is also linked to from the Upgrade Assistant entry.

Data Views management page:

![management](https://github.com/user-attachments/assets/ed42310c-d7fa-48ba-8430-533e9230b48d)

Upgrade Assistant:
<img
src="https://github.com/user-attachments/assets/4ff27866-4fe8-4357-82e8-cd4c503ab50b"
width="500" />

Resolves elastic#182067.

### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [x] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: Matt Kime <[email protected]>
Co-authored-by: kibanamachine <[email protected]>
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 9, 2024
…ment page (elastic#202250)

## Summary

Scripted fields in data views have been deprecated since 7.13, and
superseded by runtime fields.

The ability to create new scripted fields has been removed from the Data
Views management page in 9.0. Existing scripted fields can still be
edited or deleted, and the creation UI can be accessed by navigating
directly to
`/app/management/kibana/dataViews/dataView/{dataViewId}/create-field`,
but it is recommended to migrate to runtime fields or ES|QL instead to
prepare for removal.

Additionally, the scripted fields entry in the Upgrade Assistant has
been updated to reflect these changes, improve migration instructions,
and surface the full list of data views across all spaces that contain
scripted fields as well as their associated spaces. New documentation
has been added to the "Manage data views" page with examples and
instructions to help users migrate off scripted fields to runtime fields
or ES|QL, which is also linked to from the Upgrade Assistant entry.

Data Views management page:

![management](https://github.com/user-attachments/assets/ed42310c-d7fa-48ba-8430-533e9230b48d)

Upgrade Assistant:
<img
src="https://github.com/user-attachments/assets/4ff27866-4fe8-4357-82e8-cd4c503ab50b"
width="500" />

Resolves elastic#182067.

### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [x] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: Matt Kime <[email protected]>
Co-authored-by: kibanamachine <[email protected]>
Samiul-TheSoccerFan pushed a commit to Samiul-TheSoccerFan/kibana that referenced this pull request Dec 10, 2024
…ment page (elastic#202250)

## Summary

Scripted fields in data views have been deprecated since 7.13, and
superseded by runtime fields.

The ability to create new scripted fields has been removed from the Data
Views management page in 9.0. Existing scripted fields can still be
edited or deleted, and the creation UI can be accessed by navigating
directly to
`/app/management/kibana/dataViews/dataView/{dataViewId}/create-field`,
but it is recommended to migrate to runtime fields or ES|QL instead to
prepare for removal.

Additionally, the scripted fields entry in the Upgrade Assistant has
been updated to reflect these changes, improve migration instructions,
and surface the full list of data views across all spaces that contain
scripted fields as well as their associated spaces. New documentation
has been added to the "Manage data views" page with examples and
instructions to help users migrate off scripted fields to runtime fields
or ES|QL, which is also linked to from the Upgrade Assistant entry.

Data Views management page:

![management](https://github.com/user-attachments/assets/ed42310c-d7fa-48ba-8430-533e9230b48d)

Upgrade Assistant:
<img
src="https://github.com/user-attachments/assets/4ff27866-4fe8-4357-82e8-cd4c503ab50b"
width="500" />

Resolves elastic#182067.

### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [x] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: Matt Kime <[email protected]>
Co-authored-by: kibanamachine <[email protected]>
mykolaharmash pushed a commit to mykolaharmash/kibana that referenced this pull request Dec 11, 2024
…ment page (elastic#202250)

## Summary

Scripted fields in data views have been deprecated since 7.13, and
superseded by runtime fields.

The ability to create new scripted fields has been removed from the Data
Views management page in 9.0. Existing scripted fields can still be
edited or deleted, and the creation UI can be accessed by navigating
directly to
`/app/management/kibana/dataViews/dataView/{dataViewId}/create-field`,
but it is recommended to migrate to runtime fields or ES|QL instead to
prepare for removal.

Additionally, the scripted fields entry in the Upgrade Assistant has
been updated to reflect these changes, improve migration instructions,
and surface the full list of data views across all spaces that contain
scripted fields as well as their associated spaces. New documentation
has been added to the "Manage data views" page with examples and
instructions to help users migrate off scripted fields to runtime fields
or ES|QL, which is also linked to from the Upgrade Assistant entry.

Data Views management page:

![management](https://github.com/user-attachments/assets/ed42310c-d7fa-48ba-8430-533e9230b48d)

Upgrade Assistant:
<img
src="https://github.com/user-attachments/assets/4ff27866-4fe8-4357-82e8-cd4c503ab50b"
width="500" />

Resolves elastic#182067.

### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [x] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: Matt Kime <[email protected]>
Co-authored-by: kibanamachine <[email protected]>
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 12, 2024
…ment page (elastic#202250)

## Summary

Scripted fields in data views have been deprecated since 7.13, and
superseded by runtime fields.

The ability to create new scripted fields has been removed from the Data
Views management page in 9.0. Existing scripted fields can still be
edited or deleted, and the creation UI can be accessed by navigating
directly to
`/app/management/kibana/dataViews/dataView/{dataViewId}/create-field`,
but it is recommended to migrate to runtime fields or ES|QL instead to
prepare for removal.

Additionally, the scripted fields entry in the Upgrade Assistant has
been updated to reflect these changes, improve migration instructions,
and surface the full list of data views across all spaces that contain
scripted fields as well as their associated spaces. New documentation
has been added to the "Manage data views" page with examples and
instructions to help users migrate off scripted fields to runtime fields
or ES|QL, which is also linked to from the Upgrade Assistant entry.

Data Views management page:

![management](https://github.com/user-attachments/assets/ed42310c-d7fa-48ba-8430-533e9230b48d)

Upgrade Assistant:
<img
src="https://github.com/user-attachments/assets/4ff27866-4fe8-4357-82e8-cd4c503ab50b"
width="500" />

Resolves elastic#182067.

### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [x] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: Matt Kime <[email protected]>
Co-authored-by: kibanamachine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Data Views Data Views code and UI - index patterns before 8.0 Feature:Scripted Fields Scripted fields features release_note:breaking Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[dataViews] Deprecation of scripted field creation